import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
const router = new VueRouter({
  routes: [
    {
      path: "/",
      name: "Home",
      redirect: "/todo",
      component: () => import("@/components/Welcome"),
      children: [
        {
          path: "todo",
          name: "Todo",
          component: () => import("@/components/Todo")
        }
      ]
    },
    {
      path: "/register",
      name: "UserRegister",
      component: () => import("@/components/UserRegister")
    },
    {
      path: "/login",
      name: "UserLogin",
      component: () => import("@/components/UserLogin")
    }
  ]
});
export default router;
